Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metering. #450

Merged
merged 35 commits into from
Jun 7, 2019
Merged

Metering. #450

merged 35 commits into from
Jun 7, 2019

Conversation

losfair
Copy link
Contributor

@losfair losfair commented May 16, 2019

TODO

  • Add test to verify points used after function call
  • Add test to verify function call will trap
  • Add documentation

@losfair
Copy link
Contributor Author

losfair commented May 16, 2019

bors try

bors bot added a commit that referenced this pull request May 16, 2019
@bors
Copy link
Contributor

bors bot commented May 16, 2019

try

Build failed

@losfair
Copy link
Contributor Author

losfair commented May 16, 2019

bors try

bors bot added a commit that referenced this pull request May 16, 2019
@bors
Copy link
Contributor

bors bot commented May 16, 2019

@@ -92,6 +92,8 @@ pub struct InternalCtx {

pub memory_base: *mut u8,
pub memory_bound: usize,

pub internals: *mut [u64; INTERNALS_SIZE], // TODO: Make this dynamic?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider embedding array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internals are intended to be statically allocated to middleware modules. I think a fixed-size array would be suitable for this case.

@losfair
Copy link
Contributor Author

losfair commented May 23, 2019

bors try

@bors
Copy link
Contributor

bors bot commented May 23, 2019

try

Merge conflict

lib/llvm-backend/src/code.rs Outdated Show resolved Hide resolved
@losfair losfair force-pushed the feature/metering branch from d8412f2 to 66f9049 Compare June 4, 2019 05:22
@losfair losfair changed the title Metering and function call trampolines. Metering. Jun 4, 2019
@bjfish
Copy link
Contributor

bjfish commented Jun 4, 2019

bors try

bors bot added a commit that referenced this pull request Jun 4, 2019
@bors
Copy link
Contributor

bors bot commented Jun 4, 2019

@bjfish
Copy link
Contributor

bjfish commented Jun 5, 2019

bors try

bors bot added a commit that referenced this pull request Jun 5, 2019
@bors
Copy link
Contributor

bors bot commented Jun 5, 2019

bors bot added a commit that referenced this pull request Jun 5, 2019
481: Added context trampoline into runtime r=losfair a=syrusakbary

Based on #450 

Co-authored-by: losfair <zhy20000919@hotmail.com>
@bjfish
Copy link
Contributor

bjfish commented Jun 7, 2019

bors try

bors bot added a commit that referenced this pull request Jun 7, 2019
@bors
Copy link
Contributor

bors bot commented Jun 7, 2019

@bjfish
Copy link
Contributor

bjfish commented Jun 7, 2019

bors r+

bors bot added a commit that referenced this pull request Jun 7, 2019
450: Metering. r=bjfish a=losfair

TODO
- [x] Add test to verify points used after function call
- [x] Add test to verify function call will trap
- [x] Add documentation

Co-authored-by: losfair <zhy20000919@hotmail.com>
Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jun 7, 2019

@bors bors bot merged commit f6ecfa4 into master Jun 7, 2019
@bors bors bot deleted the feature/metering branch June 7, 2019 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants